home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #23 (Aug 87) / color menus source / MenuFun.R < prev   
Text File  |  1987-06-17  |  5KB  |  309 lines

  1. *  MenuFun.R
  2. *    RMaker Source code for the resources to be included in
  3. *    the MenuFun application.  Includes the Color Menu info.
  4. MenuFun Rsrc
  5.  
  6. * Main Window, Quit Alert, About Alert & Text Edit Dialog
  7. Type WIND
  8.   ,128
  9. MenuFun
  10. 40 106 240 406
  11. Visible NoGoAway
  12. 0
  13. 0
  14.  
  15. Type ALRT
  16.   ,128
  17. 50 106 230 406
  18. 128
  19. 4444
  20.  
  21.   ,129
  22. 50 106 150 406
  23. 129
  24. 444
  25.  
  26. Type DLOG
  27.   ,130
  28.  
  29. 50 56 175 456
  30. Visible NoGoAway
  31. 3
  32. 0
  33. 130
  34.  
  35. Type DITL
  36.   ,128
  37. 4
  38.  
  39. button
  40. 140 120 159 180
  41. OK
  42.  
  43. staticText
  44. 20 65 39 235
  45. MenuFun by Steve Sheets
  46.  
  47. staticText
  48. 40 50 59 250
  49. Sample Mac // Menu Program
  50.  
  51. staticText
  52. 60 30 119 270
  53. This program uses the Mac // Menu Manager to create Hierarchical and Color Menus.
  54.  
  55.   ,129
  56. 3
  57.  
  58. button
  59. 60 180 80 240
  60. Cancel
  61.  
  62. button
  63. 60 60 80 120
  64. OK
  65.  
  66. staticText
  67. 20 37 40 263
  68. Do you wish to quit this program?
  69.  
  70.   ,130
  71. 4
  72.  
  73. button
  74. 85 110 105 170
  75. OK
  76.  
  77. button
  78. 85 230 105 290
  79. Cancel
  80.  
  81. staticText
  82. 20 20 40 160
  83. Text to be Diplayed:
  84.  
  85. editText
  86. 45 20 65 380
  87.  
  88.  
  89. * Menu Resources
  90. Type MENU
  91.   ,40
  92. \14
  93.   About MenuFun...
  94.   (-
  95.  
  96.   ,41
  97. File
  98.   Edit Text/E
  99.   (-
  100.   Quit/Q
  101.  
  102.   ,42
  103. Edit
  104.   Undo/Z
  105.   (-
  106.   Cut/X
  107.   Copy/C
  108.   Paste/V
  109.   Clear
  110.  
  111. * Menu containing various Menu Items that are attached
  112. *   to other SubMenus (ie. Hierarchical Menu).  Note the
  113. *   inserted hex values using the \ command.  Ex:
  114. *   /\1B sets Keyboard Equivalent to $1B and !\2C sets
  115. *   Character Mark to $2C or 44 (Color Menu ID number).
  116.   ,43
  117. Display
  118.   Color/\1B!\2C
  119.   Font/\1B!\2D
  120.   Size/\1B!\2E
  121.   Style/\1B!\2F
  122.   Justification/\1B!\30
  123.  
  124. * SubMenus attached to Display Menu
  125.   ,44
  126. Color
  127.   Foreground/\1B!\31
  128.   Background/\1B!\32
  129.  
  130.   ,45
  131. Font
  132.  
  133.   ,46
  134. Font
  135.   9
  136.   10
  137.   12
  138.   18
  139.   24
  140.   32
  141.  
  142.   ,47
  143. Style
  144.   Bold<B/B
  145.   Italic<I/I
  146.   Underline<U/U
  147.   Outline<O/O
  148.   Shadow<S/S
  149.   Condense
  150.   Extended
  151.  
  152.   ,48
  153. Justification
  154.   Right/R
  155.   Left/L
  156.   Center
  157.  
  158. * SubMenus attached to Color SubMenu
  159.   ,49
  160. Foreground
  161.   Black
  162.   White
  163.   Red
  164.   Green
  165.   Blue
  166.   Cyan
  167.   Magenta
  168.   Yellow
  169.  
  170.   ,50
  171. Background
  172.   Black
  173.   White
  174.   Red
  175.   Green
  176.   Blue
  177.   Cyan
  178.   Magenta
  179.   Yellow
  180.  
  181. * Starting Display Text
  182. Type STR#
  183.   ,128
  184. 1
  185. Welcome to MenuFun
  186.  
  187. * Menu Color Resources
  188. *   First comes the number of entries.  Each entry contatins 
  189. *   the Menu ID number & the Menu Item number, followed by 
  190. *   4 RGB values (three 16-bit integers in Hex) ending with
  191. *   a single integer filler.
  192. Type mctb = GNRL
  193. * For MMenu Bar Entry (ID #0), Default Title & Title Background Color
  194. *   is Green on White, while Default Item (Command, Mark & Name)
  195. *   and Item Background is Blue on White.
  196.   ,0
  197. * Number of entries
  198. .I
  199. 1
  200. .I
  201. * Menu ID number & the Menu Item number, in this case 0 & 0
  202. *   Menu Bar Entry.
  203. 0 0
  204. .H
  205. * 4 RGB Colors each containing 3 integers (Green, White,
  206. *   Blue, White) and the final placing holding integer.
  207. 0000 FFFF 0000 FFFF FFFF FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
  208.  
  209. * For Apple Menu (ID #40), 3 entries.  Title & Title Background Color
  210. *   is Green on White, while Default Item (Command, Mark & Name)
  211. *   and Item Background is Red on White.  Items 1 & 2 set Mark, 
  212. *   Command and Name Color to Blue and Background to White.
  213.   ,40
  214. .I
  215. 3
  216. .I
  217. 40 0
  218. .H
  219. 0000 FFFF 0000 FFFF FFFF FFFF FFFF 0000 0000 FFFF FFFF FFFF 0000
  220. .I
  221. 40 1
  222. .H
  223. 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
  224. .I
  225. 40 2
  226. .H
  227. 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
  228.  
  229. * For Foreground Menu (ID #49), 8 entries (1 per Menu Item).
  230. *   1st and 2nd Items, Mark, Command and Name colors are black,
  231. *   while Background color is White.  3rd through 8th Items are
  232. *   the same as 1st Item, except that the Mark, Command and Name
  233. *   colors are Red, Green, Blue, Cyan, Magenta or Yellow
  234. *   (in that order).
  235.   ,49
  236. .I
  237. 8
  238. .I
  239. 49 1
  240. .H
  241. 0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
  242. .I
  243. 49 2
  244. .H
  245. 0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
  246. .I
  247. 49 3
  248. .H
  249. FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF 0000
  250. .I
  251. 49 4
  252. .H
  253. 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 FFFF FFFF FFFF 0000
  254. .I
  255. 49 5
  256. .H
  257. 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
  258. .I
  259. 49 6
  260. .H
  261. 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF FFFF 0000
  262. .I
  263. 49 7
  264. .H
  265. FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF 0000
  266. .I
  267. 49 8
  268. .H
  269. FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF 0000
  270.  
  271. * For Background Menu (ID #50), identical to Foreground Menu.
  272.   ,50
  273. .I
  274. 8
  275. .I
  276. 50 1
  277. .H
  278. 0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
  279. .I
  280. 50 2
  281. .H
  282. 0000 0000 0000 0000 0000 0000 0000 0000 0000 FFFF FFFF FFFF 0000
  283. .I
  284. 50 3
  285. .H
  286. FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF 0000
  287. .I
  288. 50 4
  289. .H
  290. 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF 0000 FFFF FFFF FFFF 0000
  291. .I
  292. 50 5
  293. .H
  294. 0000 0000 FFFF 0000 0000 FFFF 0000 0000 FFFF FFFF FFFF FFFF 0000
  295. .I
  296. 50 6
  297. .H
  298. 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF FFFF 0000
  299. .I
  300. 50 7
  301. .H
  302. FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF FFFF 0000
  303. .I
  304. 50 8
  305. .H
  306. FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF 0000 FFFF FFFF FFFF 0000
  307.  
  308.